﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Caching;

namespace Dazaza.Framework
{
    public class CacheHelperBase
    {
        public static T GetByDependency<T>(string key)
        {
            return (T)System.Web.HttpRuntime.Cache.Get(key);
        }
        public static void SetByDependency(string key, object value, string fileName)
        {
            if (value == null) return;
            var cacheDependency = new CacheDependency(fileName);
            System.Web.HttpRuntime.Cache.Insert(key, value, cacheDependency);
        }
    }
  
}
